package com.JZ.QM.service;

import com.JZ.QM.common.entity.TradeRecordEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import com.JZ.QM.common.utils.PageUtils;
import com.JZ.QM.common.entity.WealthAccountEntity;

import java.math.BigDecimal;
import java.util.Map;

/**
 * 
 *
 * @author lyp
 * @email lyp@gmail.com
 * @date 2020-06-14 11:19:36
 */
public interface WealthAccountService extends IService<WealthAccountEntity> {

    PageUtils queryPage(Map<String, Object> params) throws Exception;

    /**
     * 将资金从平台账号转到财富账号中
     * @param accountId
     * @param comBaseId
     * @param amount
     * @return
     */
    TradeRecordEntity transferAmount(Long accountId, Long comBaseId, BigDecimal amount,Long userId);

    /**
     * 获取财富账号id根据组合产品id
     * @param comBaseId
     * @return
     */
    WealthAccountEntity getWealthAccount(Long comBaseId, Long userId);

    /**
     * 将资金从财富账号转到平台账号中
     * @param wealthAccountId
     * @return
     */
    TradeRecordEntity transferBackAmount(Long wealthAccountId, Long userId, Integer tradeCategory ,Long tradeId);
}

